<template>
  <el-dialog v-model="dialog" :title="Title" width="60%" :before-close="handleClose">
    <div v-if="Title=='详情'">
      <EditForm  @editForm="editForm" :orderid="OrderIDValue"></EditForm>
    </div>    
  </el-dialog>
 
</template>

<script lang="ts" setup>
import { ref,defineEmits } from 'vue'
import EditForm from './EditForm.vue';
const OrderIDValue=ref('');
const emit = defineEmits(['updateForm'])
const Title=ref<String>('')
const dialog = ref<Boolean>(false)
const Open = (query,OrderID) => {
  OrderIDValue.value=OrderID
  Title.value=query
  dialog.value = true
}
  const handleClose = (done: () => void) => {
    done();
  }
  const editForm=()=>{
    emit('updateForm')
    dialog.value = false
    OrderIDValue.value='0'
  }
defineExpose({
  Open
})


</script>

